﻿<UserControl x:Class="WeatherClockWidget.WeatherAnimation.RainWiper"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             Loaded="UserControl_Loaded" Opacity="0">
    <UserControl.Resources>
        <Storyboard x:Key="MoveAnim">
            <DoubleAnimation Storyboard.TargetName="Rotation" Storyboard.TargetProperty="Angle" From="170" To="-170" Duration="0:0:0.8" AutoReverse="True" BeginTime="0:0:8" CurrentStateInvalidated="DoubleAnimation_CurrentStateInvalidated" Completed="DoubleAnimation_Completed"/>
        </Storyboard>
        <Storyboard x:Key="StreaksAnim">
            <DoubleAnimation Storyboard.TargetName="Grad1" Storyboard.TargetProperty="Offset" From="0" To="1" Duration="0:0:0.35" BeginTime="0:0:8.2"/>
            <DoubleAnimation Storyboard.TargetName="Grad2" Storyboard.TargetProperty="Offset" From="0" To="1" Duration="0:0:0.35" BeginTime="0:0:8.1"/>
            <DoubleAnimation Storyboard.TargetName="Streaks" Storyboard.TargetProperty="Opacity" From="0.5" To="0" Duration="0:0:0.3" BeginTime="0:0:9.2" FillBehavior="Stop"  Completed="DoubleAnimation_Completed_1"/>
        </Storyboard>
    </UserControl.Resources>
    <Grid>
        <Image Name="Wiper" Width="40" Height="270" Stretch="Fill" RenderTransformOrigin="0.5,0" VerticalAlignment="Top">
            <Image.RenderTransform>
                <TransformGroup>
                    <RotateTransform x:Name="Rotation" Angle="0"/>
                    <TranslateTransform Y="-20"/>
                </TransformGroup>
            </Image.RenderTransform>
        </Image>
        <Grid Margin="5,40,0,0">
            <Grid.OpacityMask>
                <LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
                    <GradientStop x:Name="Grad1" Color="#FF000000" Offset="0"/>
                    <GradientStop x:Name="Grad2" Color="#00000000" Offset="0"/>
                </LinearGradientBrush>
            </Grid.OpacityMask>
            <Image Name="Streaks" Width="295" Height="210" Stretch="Fill" Opacity="0.5"/>
        </Grid>
    </Grid>
</UserControl>
